package main.java.cn.wolfcode.mapper;

import cn.wolfcode.domain.Exam;
import cn.wolfcode.domain.Question;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Exam record);

    Exam selectByPrimaryKey(Long id);

    List<Exam> selectAll();

    int updateByPrimaryKey(Exam record);

    List<Exam> selectForList(QueryObject qo);

    List<Question> selectQuestionByExamId(Long id);

    void insertRelation(@Param("id") Long id, @Param("along") Long along, @Param("count") Integer count, @Param("score") Integer score);
    List<Long> selectQuestionId(Long type);

    List<Long> getQuestionId(@Param("count") Integer count, @Param("type") Integer type);

    List<Exam> allRelation(@Param("eId") Long eId, @Param("typeId") Integer typeId);
}